package com.example.mapper;

import com.example.demo.entity.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface AdminMapper {
    @Select("SELECT * FROM admin WHERE uaccount = #{uaccount}")
    Admin findByUaccount(@Param("uaccount") String uaccount);

    @Insert("INSERT INTO admin(uaccount, upassword) VALUES (#{uaccount}, #{upassword})")
    int insert(Admin admin);
}